package com.cet.designpattern.decorator;

import java.io.*;
import java.nio.file.Files;
import java.nio.file.Paths;

/**
 * @program: cet-practice
 * @description:
 * @author: 陈恩涛
 * @create: 2023-03-19 10:26
 **/
public class InputTest {

    public static void main(String[] args) {
        int c;

        try {
            InputStream in = new LowerCaseInputStream(new BufferedInputStream(Files.newInputStream(Paths.get("test.txt"))));
            while ((c = in.read()) > 0) {
                System.out.print((char) c);
            }
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
